#define _GNU_SOURCE
#include<stdio.h>
#include<sys/types.h>
#include<sys/wait.h>
#include<unistd.h>
#include<stdlib.h>
char *const addenv[]={
  (char* const)"MYVAL=123456789",
  (char* const)"MYVAL1=123456789",
  (char* const)"MYVAL2=123456789",
  NULL
};
int main()
{
  printf("My progress is action");
  if(fork()==0)
  {
    printf("I am Child,My Pid Is:%d\n",getpid());
    sleep(1);
    char* const argv[]={
      (char*const)"other",
      (char*const)"-a",  
      (char*const)"-b",  
      (char*const)"-c",  
      (char*const)"-d",  
      NULL
    };
    for(int i=0;addenv[i];i++)
    {
      putenv(addenv[i]);
    }
    extern char** environ;
    execvpe("./other",argv,environ);
    exit(1);
  }
    waitpid(-1,NULL,0);
    printf("My progress is done");

  
}
